<template>
  <view class="dashboard">
    <view class="dashboard-main">
      <!-- 个人信息：头像，昵称，段位 -->
      <view class="user-info">
        <AtAvatar size="large" circle :image="tx"></AtAvatar>
        <view class="name">可乐宗介</view>
        <view class="level">最强王者</view>
      </view>
      <!-- 折线图 -->
      <view class="gauge-chart">
        <e-chart ref="vueref0" canvas-id="gauge-canvas" />
      </view>
      <!-- 最新战绩 -->
    </view>
  </view>
</template>

<script>
import "./index.scss";
import { AtCard, AtAvatar } from "taro-ui-vue";

import tx from "../../../assets/images/tx.png";
import { EChart } from "echarts-taro3-vue";
import Taro from "@tarojs/taro";
export default {
  data() {
    return {
      tx: tx
    };
  },
  components: {
    AtCard,
    AtAvatar,
    EChart
  },
  methods: {},
  mounted() {
    // const defaultOption = {
    //   xAxis: {
    //     type: "category",
    //     data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
    //   },
    //   yAxis: {
    //     type: "value"
    //   },
    //   series: [
    //     {
    //       data: [120, 200, 150, 80, 70, 110, 130],
    //       type: "bar",
    //       showBackground: true,
    //       backgroundStyle: {
    //         color: "rgba(220, 220, 220, 0.8)"
    //       }
    //     }
    //   ]
    // };
    // Taro.nextTick(() => {
    //   this.$refs.vueref0.refresh(defaultOption);
    // });
  }
};
</script>
